﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:vtex="http://www.vtex.com.br/2009/vtex-common" xmlns:vtex.cmc="http://www.vtex.com.br/2009/vtex-commerce">
<head>
<title></title>
</head>
<body>
	<div id="quickview-area">
		<div id="head">
			<span id="titulo"><vtex.cmc:productName /> </span> <span id="detalhes"><vtex.cmc:productDescriptionShort /> </span>
			<div id="rating">
				<vtex.cmc:evaluationRate />
			</div>
		</div>
		<div id="left">
			<div id="facebook">
				<iframe src="http://www.facebook.com/plugins/like.php?href&amp;send=false&amp;layout=standard&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=35" scrolling="no" frameborder="0" style="border: none; overflow: hidden; width: 300px; height: 35px;"></iframe>
			</div>
			<div id="imagem">
				<vtex.cmc:ProductImage />
			</div>
			<img alt="" title="" src="/Control/ArquivoExibir.aspx?NomeArquivo=quick_sombra.png" id="sombra" /> <a id="productViewDetails" title="Ver todos os detalhes" class="imgRp" target="_top"><img alt="" title=""
				src="/Control/ArquivoExibir.aspx?NomeArquivo=abrir_inteiro.png" /> </a>
		</div>
		<div id="right">
			<div id="valores">
				<vtex.cmc:skuPrice />
				<span id="anterior"></span> <span id="atual"></span> <span id="parcela"></span> <span id="frete"></span>
			</div>
			
			<img alt="" title="" src="/Control/ArquivoExibir.aspx?NomeArquivo=quick_tab1.png" class="tab" />

			<!-- SELECAO COR -->
			<div class="selecao select-cor"></div>

			<img alt="" title="" src="/Control/ArquivoExibir.aspx?NomeArquivo=quick_tab2.png" class="tab" />
			<!-- SELECAO TAMANHO -->
			<div class="selecao select-tamanho">
				<vtex.cmc:stockKeepingUnitSelection />
			</div>
			<img alt="" title="" src="/Control/ArquivoExibir.aspx?NomeArquivo=quick_tab3.png" class="tab" />

			<div id="buyButton-quickView">
				<vtex.cmc:BuyButton />
			</div>
		</div>
	</div>
	<vtex.cmc:productQuickView />
	
	
	<script type="text/javascript">
		try {
			$('#quickview-area #head #titulo').append( $('#quickview-area #head #titulo .productName').text() );
			$('#quickview-area #head #titulo .productName').remove();
			$('#quickview-area #head #rating strong').remove();
			//$('#quickview-area #right .select-cor').html( $('#quickview-area #left #imagem #show').html() );
			$('#quickview-area #left #imagem ul.thumbs').remove();
			$('#quickview-area #right .select-cor #include').remove();
		} catch (e) {
			console.debug('Falha no try');
		}
		
		
		var seletorTamanhoSrc = ".select-tamanho ul:eq(0) li:eq(1) select";
	    var seletorCorSrc = ".select-tamanho ul:eq(1) li:eq(1) select";
	    selectToUl("ul_skuTamanho","\u00a0\u00a0LIMPAR\u00a0",seletorTamanhoSrc,".select-tamanho");
	    selectToUl("ul_skuCor","\u00a0\u00a0LIMPAR\u00a0",seletorCorSrc,".select-cor");
	    
	    //ADICIONA A EVENTO CLICK NOS LIs CRIADOS
	    $(".ul_skuTamanho li,.ul_skuCor li").click(function(){
	    	var skuSelect,skuSelectOther,skuLiOther;
	    	
	    	if($(this).parent().attr("class")=="ul_skuTamanho"){
	    		skuSelect = ".select-tamanho ul:eq(0) li:eq(1) select";
	    		skuSelectOther = ".select-tamanho ul:eq(1) li:eq(1) select";
	    		skuLiOther = ".ul_skuCor";
	    	}
	    	else if($(this).parent().attr("class")=="ul_skuCor"){
	    		skuSelect = ".select-tamanho ul:eq(1) li:eq(1) select";
	    		skuSelectOther = ".select-tamanho ul:eq(0) li:eq(1) select";
	    		skuLiOther = ".ul_skuTamanho";
	    	}
	    	disparaEvtSku( $(this),skuSelect,skuLiOther,skuSelectOther,"change" );
	    });
	    
	    //ADICIONA O EVENTO CLICK NO BOTAO COMPRAR DO QUICK-VIEW
	    $("#quickview-area #right #buyButton-quickView a").click(function(){
	    	var selCorOK, selTamanhoOk;
	    	var nomeProdQuickView 	=  $("#quickview-area #head span.#titulo").text();
	    	var selTamanho 			=  $("#quickview-area #right .select-tamanho ul.Tamanho li.select select").val();
	    	var selCor 				=  $("#quickview-area #right .select-tamanho ul.Cor li.select select").val();
	    	var nomeProdVitrine;
	    	var prodUri;
	    	console.log(selTamanho.val());
	    	console.log(selCor.val());
	    	return false;
	    	if( selTamanho != "" || selCor != "" ){
		    	$(".produtos .prateleira ul li.calcados").each(function(){
		    		nomeProdVitrine = $(this).find(".vitrine span.titulo").text();	    		
		    		if(nomeProdQuickView==nomeProdVitrine){
		    			prodUri = $(this).find("input.productUri").val();
		    			window.location.href = prodUri;
		    			return false;
		    		}
		    	})
	    	}
	    });
	</script>

</body>
</html>